package com.vhly.apb;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by IntelliJ IDEA.
 * User: vhly[FR]
 * Date: 11-1-10
 * Email: vhly@163.com
 */
public class ContactDBHelper extends SQLiteOpenHelper{

    public static final String TABLE_CONTACT_V1 = "create table contacts (_id  INTEGER PRIMARY KEY, name TEXT NOT NULL)";

    /**
     * Default Constructor
     * @param context Context
     * @param name DBName
     * @param version Current Open DB Version
     */
    public ContactDBHelper(Context context, String name, int version) {
        super(context, name, null, version);
    }

    /**
     * Create Database<br/>
     * When db created, create table or modify.
     * @param sqLiteDatabase DB
     */
    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
    }

    /**
     * When create, if version is updated, will call this method.
     * @param sqLiteDatabase Database
     * @param oldVer Database old Version
     * @param newVer Database new version
     * @see ContactDBHelper#ContactDBHelper(android.content.Context, String, int)
     */
    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVer, int newVer) {
    }
}
